<template>
  <div>
    <button @click="isShow = !isShow">显示/隐藏</button>
      <transition
        enter-active-class="animate__bounceIn"
        leave-active-class="animate__hinge"
      >
        <h2 class="animate__animated" v-show="isShow">你好</h2>
      </transition>
  </div>
</template>

<script>
  import 'animate.css'
  export default {
    name:'App',
    data() {
      return {
        isShow:true
      }
    },
  }
</script>

<style>
  * {
    margin: 0;
    padding: 0;
  }
  h2 {
    background-image: linear-gradient(45deg,red,yellow,pink,green);
    box-shadow: 0 0 5px;
  }
</style>